--   1--2--3
--   8     4
--   7<-6--5
--   0     9

RegisterLandmark("rg_parawormhole_start")
RegisterLandmark("rg_parawormhole_end")

local data = {
	RG_ParaStart = {
		-- room = "SpiderMarsh",
		room = "BrokenAltar",
		room_bg = GROUND.DIRT,
	},
	RG_ParaRocky = {
		room = "Rocky",
		room_bg = GROUND.DIRT,
	},
	RG_ParaForest = {
		room = "RG_DeepForest",
		room_bg = GROUND.FOREST,
	},
	RG_ParaPlain = {
		room = "BeefalowPlain",
		room_bg = GROUND.GRASS,
	},
	RG_ParaMerm = {
		room = "SlightlyMermySwamp",
		room_bg = GROUND.DIRT,
	},
	-- RG_ParaWormhole = {
	-- 	room = "SpiderMarsh",
	-- 	room_bg = GROUND.CHECKER,
	-- },
}

for k,v in pairs(data)do
	local isstart = k:find("Start") ~= nil

	RG_AddTask(k, {
		locks = isstart and LOCKS.NONE or LOCKS.RG_LINK1,
		keys_given = KEYS.RG_LINK1,
		room_choices = {[v.room] = 1},
		room_bg = v.room_bg,
		entrance_room = v.entrance_room,
		background_room = "RG_Blank",
	})
end


RG_AddLevel{
	id = "RG_PARAWORLD",
	overrides={
		{"start_setpeice",   "MainCampsiteLayout"},
		{"start_node",       "Main_Campsite_Room"},
		{"day",              "onlyday"},
		{"world_size",       "tiny"},

		{"branching",        "never"},
		{"loop",             "always"},
		{"islands",          "always"},
	},

	tasks = {
		"RG_ParaStart",
		"RG_ParaForest",
		"RG_ParaRocky",
		"RG_ParaMerm",
		"RG_ParaPlain",
		-- "RG_ParaWormhole",
	},

	numoptionaltasks = 0,

	background_node_range = {8, 8},
}